<template>
  <el-button type="primary"
             @click="updateOption">更改配置</el-button><br /><br />
  <avue-form ref="form"
             :option="option"
             v-model="form"></avue-form>
</template>
<script>
export default {
  data () {
    return {
      form: {},
      option: {
        column: [{
          label: '字典',
          prop: 'checkbox',
          span: 24,
          type: 'checkbox',
          dicData: [{
            label: '单选字典1',
            value: 1
          }, {
            label: '单选字典0',
            value: 2
          }]
        }]
      }
    }
  },
  methods: {
    updateOption () {
      var column = this.findObject(this.option.column, 'checkbox');
      column.type = "radio"
      column.dicData = [{
        label: '下拉框字典1',
        value: 1
      }, {
        label: '下拉框字典0',
        value: 2
      }]
    }
  }
}
</script>